<?php
define('ROOT_PATH', dirname(__FILE__));
define('DS', DIRECTORY_SEPARATOR);

define('CONF_PATH', ROOT_PATH.DS.'config');
define('INC_PATH', ROOT_PATH.DS.'include');
define('LANG_PATH', ROOT_PATH.DS.'language');
define('TPL_PATH', ROOT_PATH.DS.'template');

set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__).DS.'library');

require_once 'Vcms/Util.php';
require_once 'Vcms/DB.php';
require_once 'Vcms/Tpl.php';
require_once 'Vcms/Lang.php';

require_once 'Vcms/functions.php';

define('ROOT_URL', Util::curRootURL());


include(CONF_PATH.'/config.php');

if (!get_magic_quotes_gpc()) 
{   
	Util::addSlashes($_GET);   
	Util::addSlashes($_POST);   
	Util::addSlashes($_COOKIE);
}
DB::init($config['db']);

Tpl::init();
Lang::init();

